package com.liuhung.base.Comparator;

import java.util.Comparator;
import java.util.Date;


import com.liuhung.base.entity.BaseEntity;

public class TimeComparator implements Comparator<BaseEntity> {

	public int compare(BaseEntity a, BaseEntity b)  {
		Date d1=a.getDatecreated();
		Date d2=b.getDatecreated();
		return (int) (d1.getTime()-d2.getTime());
	}
}
